package org.wanho.ums;

import org.wanho.util.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Author：汤小洋
 * Date：2023-04-21 14:40
 * Description：<描述>
 */
public class UserMapper implements RowMapper<User> {
    @Override
    public User mapRow(ResultSet rs) throws SQLException {
        User u = new User();
        u.setId(rs.getInt("id"));
        u.setName(rs.getString("name"));
        u.setPwd(rs.getString("pwd"));
        u.setAge(rs.getInt("age"));
        u.setHobby(rs.getString("hobby"));
        u.setInfo(rs.getString("info"));
        u.setSex(rs.getString("sex"));
        return u;
    }
}
